#ifndef SEQUENTIAL_TABLE_H
#define SEQUENTIAL_TABLE_H


// 节点相关宏
#define MAX_NAME_LENGTH     21
#define MAX_GENDER_LENGTH   6
#define MAX_ID_LENGTH       11
#define MAX_PHONE_LENGTH    12

//
typedef enum {
    SEQ_LIST_SUCCESS,
    SEQ_LIST_FAIL,
}SeqListStatus_t;

// 定义节点结构体
typedef struct {
    char name[MAX_NAME_LENGTH];
    char gender[MAX_GENDER_LENGTH];
    char studentId[MAX_ID_LENGTH];
    char phoneNum[MAX_PHONE_LENGTH];
} Node_t;

// 定义顺序表
typedef struct {
    Node_t *data;
    int length;
    int capacity;
} SeqList_t;

SeqListStatus_t SeqListInit(SeqList_t *list, int initSize);
SeqListStatus_t SeqListResize(SeqList_t *list, int newSize);
SeqListStatus_t SeqListInsert(SeqList_t *list, int position, const Node_t *node);
SeqListStatus_t SeqListDelete(SeqList_t *list, int position, Node_t *node);
void SeqListPrint(SeqList_t *list);


#endif
